import store from 'store'
const USER_KEY = 'user_key'
const CROWDS_KEY = 'crowd_key'
/**
 * 功能：工具类，存放用户信息
 */
const storageUtils  = {
  
    saveUser(user){
        
        store.set(USER_KEY,user)
    },
    getUser(){
       
        return store.get(USER_KEY) || {}
    },
    removeUser(){
        
        store.remove(USER_KEY)
    },

    saveCrowds(crowds){
        store.set(CROWDS_KEY,crowds)
    },
    getCrowds(){
        return store.get(CROWDS_KEY) || {'crowds':'100','joinRate':'10'}
    }
}
export default storageUtils